<?php echo $this->Html->docType(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <?php echo $this->Html->charset(); ?>
        <title>SimpleCRM</title>
        <?php
        echo $this->Html->meta('icon');

        echo $this->Html->meta('description', 'enter your description here');

        echo $this->Html->meta('keywords', 'Simple CRM');

        echo $this->Html->meta('publisher', 'learningconcepts.in');

        echo $this->Html->css('base');

        echo $this->Html->css('themes/bec-green/style');

        echo $this->Html->script('jquery');

        echo $scripts_for_layout;
        ?>

    </head>

    <body>

        <div id="container">

            <div id="header">

                <h1>
                    <a href="#">
                        <img alt="logo" src="logo" />
                    </a>
                </h1>

                <div id="user-navigation">

                    <ul>
                        <?php if( $this->Session->check('Auth.Employee') ) : ?>
                        <li>
                            <?php
                            echo "Welcome " . $this->Session->read('Auth.Employee.firstname') . "&nbsp;" . $this->Html->link('Logout', array('controller' => 'employees', 'action' => 'logout', 'admin' => true))
                            ?>
                        </li>
                        <?php else : ?>
                        <li>
                            <?php
                            echo $this->Html->link('Login', array('controller' => 'employees', 'action' => 'login', 'admin' => true))
                            ?>
                        </li>
                        <?php endif; ?>
                    </ul>

                    <div class="clear"></div>

                </div>

                <div id="main-navigation">

                    <ul>
                        <li>
                            <?php echo $this->Html->link('Home', APP_URL . "admin"); ?>
                        </li>
                        <li>
                            <?php echo $this->Html->link('Dashboard', APP_URL); ?>
                        </li>
                        <li <?php echo $this->Html->isActiveTab('potentials', array('index')); ?>>
                            <?php echo $this->Html->link('Leads', array('plugin' => null, 'controller' => 'potentials', 'action' => 'index', 'by' => 'leads')); ?>
                        </li>
                        <li <?php echo $this->Html->isActiveTab('Accounts', array('index')); ?>>
                            <?php echo $this->Html->link('Accounts', array('plugin' => null, 'controller' => 'potentials', 'action' => 'index', 'by' => 'accounts')); ?>
                        </li>
                    </ul>

                    <div class="clear"></div>

                    <noscript id="js-warning"><p>javascript is disabled, please enable it first.</p></noscript>

                </div>
            </div>

            <div id="wrapper">

                <div id="main">

                    <div class="block" id="block-text">

                        <div class="content">

                            <div class="inner">
                                <?php
                                echo $this->Session->flash();
                                echo $this->Session->flash('auth');
                                echo $content_for_layout;
                                ?>
                            </div>

                        </div> <!-- div class content ends here -->

                    </div> <!-- div id block-text ends here -->

                    <!-- footer starts -->
                    <div id="footer">
                        <div class="block" style="padding:5px;">

                            <p align="center">
                                Powered by <a href="http://cakephp.org" target="_blank"><b>CakePHP</b></a>
                                Copyright &copy;
                                <a target="_blank" href="http://www.learningconcepts.in">Learning Concepts</a>
                            </p>

                            <p align="center">
                                Site Design based on Web App Theme by <a target="_blank" href="http://gravityblast.com/2009/01/18/web-app-theme/">GravityBlast</a>
                            </p>

                            <div class="clear"></div>

                        </div>
                    </div>
                    <!-- footer ends -->

                </div> <!-- div id main ends here -->

                <div id="sidebar">

                    <div class="block">

                        <h3>Information</h3>

                        <div class="content">

                            <p><b>Welcome</b></p>
                            <ul class="navigation">
                                <li><a href="#">My Account</a></li>
                                <li><a href="#">My Feedbacks</a></li>
                            </ul>

                        </div>

                    </div>

                </div>

                <div class="clear"></div>

            </div> <!-- div id wrapper ends here -->

        </div> <!-- div id container ends here  -->

        <?php //echo $this->element('sql_dump'); ?>

    </body>

</html>